package org.pathlet.core.config;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.pathlet.core.config.def.AdviceConfig;
import org.pathlet.core.config.def.BeanResourceConfig;
import org.pathlet.core.config.def.PointcutConfig;
import org.pathlet.core.Module;
import org.pathlet.core.Path;

public interface ConfigManager {

	public Module getModule(String id);

	public Collection<Module> getModules();

	public BeanResourceConfig getBeanConfig(Path path);

	/**
	 * Get all bean's configurations.
	 * @return
	 */
	public Collection<BeanResourceConfig> getBeanConfigs();

	public PointcutConfig getPointcut(String id);

	public AdviceConfig getAdvice(String id);

	/**
	 * Get list of adivces against one path.
	 * @param path
	 * @return
	 */
	public List<AdviceConfig> getAdvices(Path path);

	/**
	 * Get all advices configuration.
	 * @return the key is the advisor path, value is the AdviceConfig(s) that use this advisor.
	 */
	public Map<Path, List<AdviceConfig>> getAdvices();

	/**
	 * Get aliases configuration.
	 * @return
	 */
	public Map<Path, Path> getAliases();


}
